package com.hymall.mapper;

import com.hymall.bean.MarketUser;
import com.hymall.bean.MarketUserExample;
import com.hymall.bean.vo.AdminStatUserInnerRowsVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface MarketUserMapper {
    long countByExample(MarketUserExample example);

    int deleteByExample(MarketUserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketUser record);

    int insertSelective(MarketUser record);

    List<MarketUser> selectByExample(MarketUserExample example);

    MarketUser selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketUser record, @Param("example") MarketUserExample example);

    int updateByExample(@Param("record") MarketUser record, @Param("example") MarketUserExample example);

    int updateByPrimaryKeySelective(MarketUser record);

    int updateByPrimaryKey(MarketUser record);

    /**
     * @param []
     * @return java.util.List<com.hymall.bean.vo.AdminStatUserInnerRowsVO>
     * @author 章鹏
     * @description 统计报表 → 用户统计 → 按天统计的用户信息
     * @date 2022/7/17 17:38
     */
    List<AdminStatUserInnerRowsVO> selectUserCountGroupByDay();

    int updateByExample(MarketUserExample example);


    @Update("update market_user set password = #{password} where mobile = #{mobile}")
    void resetPassword(String mobile, String password);
}